import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import WebHomeView from "@/views/web/WebHomeView";
import ManageHomeView from "@/views/manage/ManageHomeView";
import WebLoginView from "@/views/web/WebLoginView";
import ManageLoginView from "@/views/manage/ManageLoginView";
import ManageClassesTypeView from "@/views/manage/classes/ManageClassesTypeView";
import ManageNoticeView from "@/views/manage/notice/ManageNoticeView";
import ManageNoticeLevelView from "@/views/manage/notice/noticeLevel/ManageNoticeLevelView";
import ManageClassRoomTypeView from "@/views/manage/classRoom/ManageClassRoomTypeView";
import ManageRoleView from "@/views/manage/manageRole/ManageRoleView";
import ManageStudentView from "@/views/manage/student/ManageStudentView";
import ManageAdjustClassesView from "@/views/manage/adjustClasses/ManageAdjustClassesView";


import ManagePermissionView from "@/views/manage/manageRole/ManagePermissionView";
import ManageUpdateTeacherView from "@/views/manage/teacher/ManageUpdateTeacherView";
import ManageTeacherView from "@/views/manage/teacher/ManageTeacherView";
import ManageCourseListView from "@/views/manage/course/ManageCourseListView";
import ManageClassroomView from "@/views/manage/classRoom/ManageClassroomView";
import ManageNoticeTypeView from "@/views/manage/notice/ManageNoticeTypeView";
import CoursrPlanView from "@/views/manage/coursePlan/CoursePlanView";
import CoursePlanView from "@/views/manage/coursePlan/CoursePlanView";
import ManageIndexView from "@/views/manage/ManageIndexView";
import ManageClassesView from "@/views/manage/classes/ManageClassesView";
import ManageCourseTeacherList from "@/views/manage/course/ManageCourseTeacherList";
import ManageRolePermissionView from "@/views/manage/manageRole/ManageRolePermissionView";
import ManageClassmergeView from "@/views/manage/classes/ManageClassmergeView";
import ManageScheduleView from "@/views/manage/schedule/ManageScheduleView";
import WebNoticeView from "@/views/web/notice/WebNoticeView";
import ManageNotificationView from "@/views/manage/notice/ManageNotificationView";
import WebUserCenterView from "@/views/web/userCenter/WebUserCenterView";
import WebScheduleView from "@/views/web/schedule/WebScheduleView";
import ManagePersonView from "@/views/manage/ManagePersonView";
import ManageLoginLogView from "@/views/manage/log/ManageLoginLogView";
import ManageLogView from "@/views/manage/log/ManageLogView";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'web',
    component: WebHomeView,
    children:[
      {
        path: 'userCenter',
        name: 'userCenter',
        component: WebUserCenterView,
      },
      {
        path: '',
        name: 'webIndex',
        component: () => import("../views/web/WebIndexView.vue"),
      },
      {
        path: 'noticeList',
        name:'noticeList',
        component: WebNoticeView,
      },
      {
        path: 'schedule',
        name: 'schedule',
        component: WebScheduleView,
      }

    ]
  },
  {
    path: '/weblogin',
    name: 'weblogin',
    component: WebLoginView,
  },
  {
    path: '/manage/managelogin',
    name: 'managelogin',
    component: ManageLoginView,
  },
  {
    path: '/manage',
    name: 'manage',
    component: ManageHomeView,
    children:[
      {
        path: '/manage/manageperson',
        name:'manageperson',
        component: ManagePersonView,
      },
      {
        path: '',
        name: 'index',
        component: ManageIndexView
      },
      {
        path: 'schedule',
        name: 'schedule',
        component: ManageScheduleView
      },
      {
        path: 'classMerge',
        name: 'classMerge',
        component: ManageClassmergeView
      },
      {//角色
        path: 'role',
        name: 'managerole',
        component: ManageRoleView
      },
      {//权限
        path: 'permission',
        name: 'managepermission',
        component: ManagePermissionView
      },
      {//角色权限对应
        path: 'rolePermission',
        name: 'rolePermission',
        component: ManageRolePermissionView
      },
      {//班级类型
        path: 'classesTypeList',
        name: 'typeList',
        component: ManageClassesTypeView
      },
      {//班级
        path: 'classesList',
        name: 'classesList',
        component: ManageClassesView
      },
      {//教室
        path: 'classRoomList',
        name: 'classRoomList',
        component: ManageClassroomView
      },
      {//教室类型
        path: 'classRoomTypeList',
        name: 'classRoomTypeList',
        component:ManageClassRoomTypeView
      },
      {//通知
        path: 'noticeList',
        name: 'noticeList',
        component: ManageNoticeView
      },
      {//通知类型
        path: 'noticeTypeList',
        name: 'noticeTypeList',
        component: ManageNoticeTypeView
      },
      {//通知被查看
        path:'notification',
        name:'notification',
        component:ManageNotificationView
      },
      {//通知等级
        path: 'noticeLevelList',
        name: 'noticeLevelList',
        component:ManageNoticeLevelView
      },
        //全部课程
      {
        path: 'courseList',
        name: 'courseList',
        component: ManageCourseListView
      },
        //调班
      {
        path: 'adjustClassList',
        name: 'adjustClassList',
        component: ManageAdjustClassesView
      },
      {
        path: 'studentList',
        name: 'studentList',
        component: ManageStudentView
      },
      {//教师管理
        path: 'teacherList',
        name: 'teacherList',
        component: ManageTeacherView
      },
      {
        path: 'updateTeacher',
        name: 'updateTeacher',
        component: ManageUpdateTeacherView
      },
      {//课程
        path: 'courseList',
        name: 'courseList',
        component: ManageCourseListView
      },
      {//教师课程对应
        path: 'courseTeacher',
        name: 'courseTeacher',
        component: ManageCourseTeacherList
      },
      {//教室管理
        path: 'classroom',
        name: 'classroom',
        component: ManageClassroomView
      },
      {//课程计划
        path: 'coursePlan',
        name: 'coursePlan',
        component: CoursePlanView
      },
      {//课程计划
        path: 'log',
        name: 'log',
        component: ManageLogView
      },
      {//课程计划
        path: 'LongingLog',
        name: 'LongingLog',
        component: ManageLoginLogView
      },

    ]
  },

  /*{
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/!* webpackChunkName: "about" *!/ '../views/AboutView.vue')
  }*/
]

const router = new VueRouter({
  routes
})

export default router
